<template>
	<view class="content">
			
		<view class="userinfo">
			
			<view class="user_avatar">
				<image :src="user.avatar" mode=""></image>
			</view>
			
			<view class="user_more">
				
				<view class="user_more1"> {{user.nickname}} </view>
				<view class="user_more1">
					欢迎使用
				</view>
			</view>
			
		</view>
		
		
	</view>
</template>

<script>
	
	import {curl} from 'common/api.js';
	
	export default {
		data() {
			return {
				title: 'tandem串连',
				user:[]
			}
		},
		onLoad() {
			
		},
		onShow() {
			var user=uni.getStorageSync('user');
			console.log(user);
			var that=this;
			
			if(user){
				console.log(user)
				
				that.user=user;
			
			}else{
				console.log('222')
				uni.navigateTo({
					url:"/pages/login/login"
				})
			}
				
		},
		methods: {
			setmobile(ret){
				console.log(ret);
				var mobile=ret.detail.value;
				
				curl('user/setusermobile',{mobile:mobile}).then((res)=>{
					console.log(res.data)
					
					uni.showToast({
						title:res.msg,
						icon:'none'
					})
				
				});
				
			}
		}
	}
</script>

<style>
	.user_more1{
		width: 500rpx;height: 36rpx;
		text-align: center;
	}
	.user_more1{
		height: 50rpx;line-height: 40rpx;
		font-size: 30rpx;font-weight: 500;
	}
	.user_more{
		width: 500rpx;height: 90rpx;
		text-align: center;
		margin: auto;
	
	}
	
	.user_avatar>image{
		width: 100rpx;height: 100rpx;
		border-radius: 100rpx;
		display: block;
		margin: auto;
	}
	.user_avatar{
		width: 100rpx;height: 100rpx;
		margin: auto;
		margin-top: 100rpx;
	}
	
	.userinfo{
		width: 680rpx;height: 250rpx;margin: auto;
		
	}
	
	.content {
		
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
